package com.ghy.versionsone;

import java.lang.reflect.Proxy;
import java.util.ResourceBundle;

/**
 * 用来保存相关的配置信息
 */

public class GhyConfiguration {
    // 存储属性文件的信息
    public static final ResourceBundle sqlMappings;

    static {
        sqlMappings = ResourceBundle.getBundle("sql");
    }


    public <T> T getMapper(Class clazz,GhySqlSession sqlSession){
        return (T) Proxy.newProxyInstance(GhyConfiguration.class.getClassLoader(),
                new Class[]{clazz},
                new GhyMapperProxy(sqlSession));
    }

}
